package cn.mazexal.exambg.dataware;

import cn.mazexal.exambg.models.db.UserWrongDO;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
*  用户错题本 Mapper
*
*/
@Mapper
public interface UserWrongMapper extends BaseMapper<UserWrongDO> {


    int deleteUserWrong(@Param("userId") Long userId, @Param("examBankId") Long examBankId, @Param("questionId") Long questionId);

    int updateWrongTimesByQuestionIds(@Param("userId") Long userId, @Param("examBankId") Long examBankId, @Param("questionIds") List<Long> questionIds, @Param("updateTime") Long updateTime);

    List<Long> getUserWrongDeletedQuestionIds(
    @Param("userId") Long userId,
    @Param("examBankId") Long examBankId,
    @Param("questionIds") List<Long> questionIds
    );

    int refuseDelUserWrong(@Param("ids") List<Long> ids);

    List<Long> getExistUserWrongQuestionIds(
    @Param("userId") Long userId,
    @Param("examBankId") Long examBankId,
    @Param("questionIds") List<Long> questionIds
    );
}